﻿using System;
using GeoAPI.Operation.Buffer;

namespace GeoAPI.Geometries
{
	public interface IGeometry : ICloneable, IComparable, IComparable<IGeometry>, IEquatable<IGeometry>
	{
		IGeometryFactory Factory { get; }

		IPrecisionModel PrecisionModel { get; }

		int SRID { get; set; }

		string GeometryType { get; }

		OgcGeometryType OgcGeometryType { get; }

		double Area { get; }

		double Length { get; }

		int NumGeometries { get; }

		int NumPoints { get; }

		IGeometry Boundary { get; }

		Dimension BoundaryDimension { get; }

		IPoint Centroid { get; }

		Coordinate Coordinate { get; }

		Coordinate[] Coordinates { get; }

		double[] GetOrdinates(Ordinate ordinate);

		Dimension Dimension { get; set; }

		IGeometry Envelope { get; }

		Envelope EnvelopeInternal { get; }

		IPoint InteriorPoint { get; }

		IPoint PointOnSurface { get; }

		IGeometry GetGeometryN(int n);

		void Normalize();

		IGeometry Normalized();

		byte[] AsBinary();

		string AsText();

		object UserData { get; set; }

		IGeometry ConvexHull();

		IntersectionMatrix Relate(IGeometry g);

		IGeometry Difference(IGeometry other);

		IGeometry SymmetricDifference(IGeometry other);

		IGeometry Buffer(double distance);

		IGeometry Buffer(double distance, int quadrantSegments);

		[Obsolete]
		IGeometry Buffer(double distance, BufferStyle endCapStyle);

		[Obsolete]
		IGeometry Buffer(double distance, int quadrantSegments, BufferStyle endCapStyle);

		IGeometry Buffer(double distance, int quadrantSegments, EndCapStyle endCapStyle);

		IGeometry Buffer(double distance, IBufferParameters bufferParameters);

		IGeometry Intersection(IGeometry other);

		IGeometry Union(IGeometry other);

		IGeometry Union();

		bool EqualsTopologically(IGeometry other);

		bool EqualsExact(IGeometry other);

		bool EqualsExact(IGeometry other, double tolerance);

		bool EqualsNormalized(IGeometry g);

		bool IsEmpty { get; }

		bool IsRectangle { get; }

		bool IsSimple { get; }

		bool IsValid { get; }

		bool Within(IGeometry g);

		bool Contains(IGeometry g);

		bool IsWithinDistance(IGeometry geom, double distance);

		bool CoveredBy(IGeometry g);

		bool Covers(IGeometry g);

		bool Crosses(IGeometry g);

		bool Intersects(IGeometry g);

		bool Overlaps(IGeometry g);

		bool Relate(IGeometry g, string intersectionPattern);

		bool Touches(IGeometry g);

		bool Disjoint(IGeometry g);

		IGeometry Reverse();

		double Distance(IGeometry g);

		void Apply(ICoordinateFilter filter);

		void Apply(ICoordinateSequenceFilter filter);

		void Apply(IGeometryFilter filter);

		void Apply(IGeometryComponentFilter filter);

		void GeometryChanged();

		void GeometryChangedAction();
	}
}
